How to transform variable from continuous to categorical variable